import request, { upload } from '@/utils/request'

// 定义公共的api 
const BASE_URL = '/system/bpmnInfo';

export default {
    // 查询用户和分页
    getPageInfo(page, limit, searchObj) {
        return request({
            url: `${BASE_URL}/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },
     getById(id,type) {
        return request({
            url: `${BASE_URL}/getById/${id}/${type}`,
            method: 'get',
        })
    },


    deployBpmn(data) {
        return upload('/system/bpmnInfo/deploy', data);
    },

    // 根据id去删除
    removeById(id) {
        return request({
            url: `${BASE_URL}/remove/${id}`,
            method: 'delete'
        })
    },
}